<!DOCTYPE html>
<html lang="zh-cn">

<head>

  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="description" content="">
  <meta name="author" content="">

  <title>滑雪族 - 登录</title>

  <!-- Bootstrap Core CSS -->
  <!-- MetisMenu CSS -->
  <!-- Custom CSS -->
  <!-- Custom Fonts -->
  <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
  <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  <!--[if lt IE 9]>
  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
  <![endif]-->
    <link rel="stylesheet" href="/server/r/bower_components/bootstrap/dist/css/bootstrap.min.css" />
    <link rel="stylesheet" href="/server/r/bower_components/metisMenu/dist/metisMenu.min.css" />
    <link rel="stylesheet" href="/server/r/static/css/sb-admin-2_e507c2b.css" />
    <link rel="stylesheet" type="text/css" href="/server/r/bower_components/font-awesome/css/font-awesome.min.css" />
    <link type="text/css" rel="stylesheet" href="/server/r/static/css/hxz/common_2baa698.css" />
</head>

<body>

<div class="container">
  <input type="hidden" id="redirect" value="${redirect!''}">

  <div class="row">
    <div class="col-md-4 col-md-offset-4">
      <div class="login-panel panel panel-default">
        <div class="panel-heading">
          <h4 class="panel-title">滑雪族 微信营销平台<span class="pull-right">管理端登录</span></h4>
        </div>
        <div class="panel-body">
          <form id="login-form" role="form">
            <fieldset>
              <div class="form-group">
                <div class="input-group">
                  <span class="input-group-addon"><i class="fa fa-user" style="width: 12px;"></i></span>
                  <input class="form-control" id="username" placeholder="请输入管理员账号" name="username" type="text" autofocus>
                </div>
              </div>
              <div class="form-group">
                <div class="input-group">
                  <span class="input-group-addon"><i class="fa fa-key" style="width: 12px;"></i></span>
                  <input class="form-control" id="password" placeholder="请输入密码" name="password" type="password">
                </div>
              </div>
              <p id="msg" style="color: #a94442;" class="text-center"></p>
              <div class="form-group" style="height: 10px;"></div>
              <a href="javascript:void(0);" id="index-login-btn"  class="btn btn-success btn-block">登 录</a>
            </fieldset>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>

<!-- jQuery -->
<!-- Bootstrap Core JavaScript -->
<!-- Metis Menu Plugin JavaScript --><div id="hxz-background" class="background" style="display: none; "></div>
<div id="hxz-progressBar" class="progressBar" style="display: none; ">数据加载中，请稍等...</div>

<script src="/server/r/require.js"></script>
<script>/*resourcemap*/
require.config({paths:{
  "r/bower_components/underscore/underscore-min": "/server/r/bower_components/underscore/underscore-min",
  "r/static/js/hxz/hxz.valid": "/server/r/static/js/hxz/hxz.valid_12cc206",
  "r/static/js/hxz/hxz.rest": "/server/r/static/js/hxz/hxz.rest_07c8105",
  "r/bower_components/alertify/alertify.min": "/server/r/bower_components/alertify/alertify.min",
  "r/static/js/alertify-config": "/server/r/static/js/alertify-config_0cc8db2",
  "r/bower_components/select2/dist/js/select2": "/server/r/bower_components/select2/dist/js/select2",
  "r/static/js/hxz/hxz.ui": "/server/r/static/js/hxz/hxz.ui_0a7714d",
  "r/static/js/hxz/hxz": "/server/r/static/js/hxz/hxz_589b155",
  "r/vendor/umeditor/umeditor.config": "/server/r/vendor/umeditor/umeditor.config",
  "r/vendor/umeditor/umeditor": "/server/r/vendor/umeditor/umeditor"
}});</script>
<script src="/server/r/bower_components/jquery/dist/jquery.min.js"></script>
<script src="/server/r/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="/server/r/bower_components/metisMenu/dist/metisMenu.min.js"></script>
<script type="text/javascript">
  require(['r/bower_components/jquery/dist/jquery.min', 'r/static/js/hxz/hxz', "r/vendor/umeditor/umeditor"], function ($, hxz, UM) {
    function event() {
      $("#index-login-btn").unbind("click").on("click", function () {
        $("#index-login-btn").html("登录中...");
        var data = {
          username: $("#username").val(),
          password: $("#password").val()
        };
        hxz.doPost({url: hxz.RestApi.manageLogin, data: data}, function (data) {
          if (data.status == "1") {
            if ($("#redirect").val()) {
              window.location.href = $("#redirect").val();
            } else {
              window.location.href = "/manage/activity-list";
            }
          } else {
            $("#index-login-btn").html("登录");
            $("#msg").html("");
            $("#msg").html(data.msg);
          }
        });
      });
    }

    event();
  });
</script>
</body>
</html>
